package com.xcesys.extras.dataobject;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PaginationContent")
public class PaginationContent<T> implements Serializable {

	private static final long serialVersionUID = 1299862260671463970L;

	@XmlElement(name = "Contents")
	private List<T> contents;
	@XmlAttribute(name = "TotalCount")
	private int totalCount;
	@XmlAttribute(name = "PageSize")
	private int pageSize;
	@XmlAttribute(name = "StartIndex")
	private int startIndex;
	@XmlAttribute(name = "TotalPage")
	private int totalPage;
	@XmlAttribute(name = "CurrentPage")
	private int currentPage = 1;

	public List<T> getContents() {
		return contents;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public int getStartIndex() {
		return startIndex;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public int getTotalPage() {
		return totalPage;
	}

	public void setContents(List<T> contents) {
		this.contents = contents;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public void setStartIndex(int startIndex) {
		this.startIndex = startIndex;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

}
